Add optional Effect driver with deterministic deadline scheduling - #44
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
@hraness/direct/effect, an optional Effect 3.22.1 driver for deterministic asynchronous controller tests. Deadline mode uses Direct's existing clock, tracks operation and Layer-owned fibers, fences stale commits on reset/dispose, and retains root, child, background and teardown failures when closing. Existing FIFO scheduling and the default/core/React/testing/web package graphs stay compatible.The change includes a neutral controller example, an executable architecture policy, installed-consumer checks under Bundler and NodeNext resolution, and bounded package-inventory updates for the added entry and source types. Independent review reproduced and repaired missing Layer-fiber quiescence and lost child Causes. Native callbacks and noncooperative work remain the caller's responsibility.
Validation:
bun run checkpasses on4f67db5 with a clean generated tree:23 release tests,424 product tests (69,186 assertions),25 todo tests,29 native example tests, real browser verification/production marker scans and iOS/Android/Web exports. Knowledge-base checks also pass. Required CI must pass before merge.Closes #43.